/**
 * 通用css样式布局处理
 * Copyright (c) 2019 ruoyi
 */

/** 基础通用 **/
.pt5 {
	padding-top: 5px;
}
.pr5 {
	padding-right: 5px;
}
.pb5 {
	padding-bottom: 5px;
}
.mt5 {
	margin-top: 5px;
}
.mr5 {
	margin-right: 5px;
}
.mb5 {
	margin-bottom: 5px;
}
.mb8 {
	margin-bottom: 8px;
}
.ml5 {
	margin-left: 5px;
}
.mt10 {
	margin-top: 10px;
}
.mr10 {
	margin-right: 10px;
}
.mb10 {
	margin-bottom: 10px;
}
.ml10 {
	margin-left: 10px;
}
.mt20 {
	margin-top: 20px;
}
.mr20 {
	margin-right: 20px;
}
.mb20 {
	margin-bottom: 20px;
}
.ml20 {
	margin-left: 20px;
}

.with100{
  width: 100%;
}

.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
	font-family: inherit;
	font-weight: 500;
	line-height: 1.1;
	color: inherit;
}

.el-form .el-form-item__label {
	font-weight: 700;
}
.el-dialog:not(.is-fullscreen) {
	margin-top: 6vh !important;
}

.el-dialog.scrollbar .el-dialog__body {
	overflow: auto;
	overflow-x: hidden;
	max-height: 70vh;
	padding: 10px 20px 0;
}

.el-table {
	.el-table__header-wrapper, .el-table__fixed-header-wrapper {
		th {
			word-break: break-word;
			background-color: #1E90FF !important;
			color: #ffffff;
			height: 40px !important;
			font-size: 13px;
		}
	}
	.el-table__body-wrapper {
		.el-button [class*="el-icon-"] + span {
			margin-left: 1px;
		}
	}
}

/** 表单布局 **/
.form-header {
    font-size:15px;
	color:#8A2BE2;
	border-bottom:1px solid #FFD700;
	margin:8px 10px 25px 10px;
	padding-bottom:5px
}

/** 表格布局 **/
.pagination-container {
	// position: relative;
	height: 25px;
	margin-bottom: 10px;
	margin-top: 15px;
	padding: 10px 20px !important;
}

/* tree border */
.tree-border {
    margin-top: 5px;
    border: 1px solid #e5e6e7;
    background: #FFFFFF none;
    border-radius:4px;
    width: 100%;
}

.pagination-container .el-pagination {
	right: 0;
	position: absolute;
}

@media ( max-width : 768px) {
  .pagination-container .el-pagination > .el-pagination__jump {
    display: none !important;
  }
  .pagination-container .el-pagination > .el-pagination__sizes {
    display: none !important;
  }
}

.el-table .fixed-width .el-button--small {
	padding-left: 0;
	padding-right: 0;
	width: inherit;
}

/** 表格更多操作下拉样式 */
.el-table .el-dropdown-link {
	cursor: pointer;
	color: #409EFF;
	margin-left: 10px;
}

.el-table .el-dropdown, .el-icon-arrow-down {
	font-size: 12px;
}

.el-tree-node__content > .el-checkbox {
	margin-right: 8px;
}

.list-group-striped > .list-group-item {
	border-left: 0;
	border-right: 0;
	border-radius: 0;
	padding-left: 0;
	padding-right: 0;
}

.list-group {
	padding-left: 0px;
	list-style: none;
}

.list-group-item {
	border-bottom: 1px solid #e7eaec;
	border-top: 1px solid #e7eaec;
	margin-bottom: -1px;
	padding: 11px 0px;
	font-size: 13px;
}

.pull-right {
	float: right !important;
}

.el-card__header {
	padding: 14px 15px 7px !important;
	min-height: 40px;
}

.el-card__body {
	padding: 15px 20px 20px 20px !important;
}

.card-box {
	padding-right: 15px;
	padding-left: 15px;
	margin-bottom: 10px;
}

/* button color */
.el-button--cyan.is-active,
.el-button--cyan:active {
  background: #20B2AA;
  border-color: #20B2AA;
  color: #FFFFFF;
}

.el-button--cyan:focus,
.el-button--cyan:hover {
  background: #48D1CC;
  border-color: #48D1CC;
  color: #FFFFFF;
}

.el-button--cyan {
  background-color: #20B2AA;
  border-color: #20B2AA;
  color: #FFFFFF;
}

/* text color */
.text-navy {
	color: #1E90FF;
}

.text-primary {
	color: #8A2BE2;
}

.text-success {
	color: #32CD32;
}

.text-info {
	color: #1E90FF;
}

.text-warning {
	color: #FFD700;
}

.text-danger {
	color: #FF4500;
}

.text-muted {
	color: #888888;
}

/* image */
.img-circle {
	border-radius: 50%;
}

.img-lg {
	width: 120px;
	height: 120px;
}

.avatar-upload-preview {
	position: absolute;
	top: 50%;
	transform: translate(50%, -50%);
	width: 200px;
	height: 200px;
	border-radius: 50%;
	box-shadow: 0 0 4px #ccc;
	overflow: hidden;
}

/* 拖拽列样式 */
.sortable-ghost{
	opacity: .8;
	color: #fff!important;
	background: #42b983!important;
}

/* 表格右侧工具栏样式 */
.top-right-btn {
	margin-left: auto;
}

 .add-btn {
   border: 1px dotted #409EFF!important;
   width: 98%
 }

 .footer-global {
   border-top: 1px solid silver;
   position: fixed;
   display: flex;
   flex-direction: row-reverse;
   align-items: center;
   right: 0;
   bottom: 0;
   //padding: 12px;
   box-shadow: -1px 0 12px 0 var(--gray-5);
   transition: all .28s;
   background-color: white;
   z-index: 200;
   left: 0;
   height: 50px;
   margin-bottom: 0 !important;
 }

 .tc {
   text-align: center;
 }

 .flex-between {
   display: flex;
   justify-content: space-between;
 }

 .flex-center {
   display: flex;
   align-items: center;
 }

 .flex-space-between {
   display: flex;
   align-items: center;
   justify-content: space-between;
 }

 .col4 {
     width: calc(25% - 1rem) !important;
     margin-right: 0px !important;
 }

// 全局样式
html {
  height: 100%;
  box-sizing: border-box;
}

body {
  height: 100%;
  margin: 0;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif;
  background-color: #f5f7fa;
}

#app {
  height: 100%;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

// 布局样式
.app-wrapper {
  position: relative;
  height: 100%;
  width: 100%;
  
  &.mobile.openSidebar {
    position: fixed;
    top: 0;
  }
}

.main-container {
  min-height: 100%;
  transition: margin-left .28s;
  margin-left: 210px;
  position: relative;
  background: #f5f7fa;
  
  .fixed-header {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 9;
    width: calc(100% - 210px);
    transition: width 0.28s;
  }
  
  .hideSidebar {
    .fixed-header {
      width: calc(100% - 54px);
    }
  }
}

// 侧边栏样式
.sidebar-container {
  transition: width 0.28s;
  width: 210px !important;
  background-color: #304156;
  height: 100%;
  position: fixed;
  font-size: 0px;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1001;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,21,41,.08);
  
  .el-scrollbar {
    height: 100%;
  }
  
  .el-scrollbar__view {
    height: 100%;
  }
  
  .el-menu {
    border: none;
    height: 100%;
    width: 100% !important;
    background-color: #304156;
  }
  
  .submenu-title-noDropdown,
  .el-submenu__title {
    &:hover {
      background-color: #263445 !important;
    }
  }
  
  .is-active>.el-submenu__title {
    color: #f4f4f5 !important;
  }
  
  & .nest-menu .el-submenu>.el-submenu__title,
  & .el-submenu .el-menu-item {
    min-width: 180px !important;
    background-color: #1f2d3d !important;
    
    &:hover {
      background-color: #001528 !important;
    }
  }
}

// 头部导航样式
.navbar {
  height: 50px;
  overflow: hidden;
  position: relative;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,21,41,.08);
  
  .hamburger-container {
    line-height: 46px;
    height: 100%;
    float: left;
    cursor: pointer;
    transition: background .3s;
    -webkit-tap-highlight-color:transparent;
    
    &:hover {
      background: rgba(0, 0, 0, .025)
    }
  }
  
  .breadcrumb-container {
    float: left;
  }
  
  .right-menu {
    float: right;
    height: 100%;
    line-height: 50px;
    
    &:focus {
      outline: none;
    }
    
    .right-menu-item {
      display: inline-block;
      padding: 0 8px;
      height: 100%;
      font-size: 18px;
      color: #5a5e66;
      vertical-align: text-bottom;
      
      &.hover-effect {
        cursor: pointer;
        transition: background .3s;
        
        &:hover {
          background: rgba(0, 0, 0, .025)
        }
      }
    }
  }
}

// 标签栏样式
.tags-view-container {
  height: 34px;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #d8dce5;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04);
  
  .tags-view-wrapper {
    .tags-view-item {
      display: inline-block;
      position: relative;
      cursor: pointer;
      height: 26px;
      line-height: 26px;
      border: 1px solid #d8dce5;
      color: #495060;
      background: #fff;
      padding: 0 8px;
      font-size: 12px;
      margin-left: 5px;
      margin-top: 4px;
      
      &:first-of-type {
        margin-left: 15px;
      }
      
      &:last-of-type {
        margin-right: 15px;
      }
      
      &.active {
        background-color: #42b983;
        color: #fff;
        border-color: #42b983;
        
        &::before {
          content: '';
          background: #fff;
          display: inline-block;
          width: 8px;
          height: 8px;
          border-radius: 50%;
          position: relative;
          margin-right: 2px;
        }
      }
    }
  }
  
  .contextmenu {
    margin: 0;
    background: #fff;
    z-index: 3000;
    position: absolute;
    list-style-type: none;
    padding: 5px 0;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 400;
    color: #333;
    box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, .3);
    
    li {
      margin: 0;
      padding: 7px 16px;
      cursor: pointer;
      
      &:hover {
        background: #eee;
      }
    }
  }
}

// 响应式布局
.hideSidebar {
  .sidebar-container {
    width: 54px !important;
  }
  
  .main-container {
    margin-left: 54px;
    
    .fixed-header {
      width: calc(100% - 54px);
    }
  }
  
  .submenu-title-noDropdown {
    padding: 0 !important;
    position: relative;
    
    .el-tooltip {
      padding: 0 !important;
      
      .svg-icon {
        margin-left: 20px;
      }
    }
  }
  
  .el-submenu {
    overflow: hidden;
    
    &>.el-submenu__title {
      padding: 0 !important;
      
      .svg-icon {
        margin-left: 20px;
      }
      
      .el-submenu__icon-arrow {
        display: none;
      }
    }
  }
  
  .el-menu--collapse {
    .el-submenu {
      &>.el-submenu__title {
        &>span {
          height: 0;
          width: 0;
          overflow: hidden;
          visibility: hidden;
          display: inline-block;
        }
      }
    }
  }
}

// 移动端适配
.mobile {
  .main-container {
    margin-left: 0px;
  }
  
  .sidebar-container {
    transition: transform .3s;
    width: 210px !important;
  }
  
  &.hideSidebar {
    .sidebar-container {
      pointer-events: none;
      transition-duration: 0.3s;
      transform: translate3d(-210px, 0, 0);
    }
  }
}

// 动画
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s;
}

.fade-enter,
.fade-leave-to {
  opacity: 0;
}

// 滚动条样式
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
  
  &:hover {
    background: #a8a8a8;
  }
}
